
from helper import record_start_time, record_end_time, read_file_content, init_openai_client

def make_api_call(client, background_content, question_content):
    """进行 API 调用"""
    return client.chat.completions.create(
        model="deepseek-r1-250120",
        messages=[
            {"role": "system", "content": background_content},
            {"role": "user", "content": question_content},
        ],
    )

def main():
    print("----- standard request -----")
    background_content = read_file_content("background.txt")
    question_content = read_file_content("question.txt")
    client = init_openai_client()
    start_time = record_start_time()
    completion = make_api_call(client, background_content, question_content)
    end_time = record_end_time(start_time)
    print(completion.choices[0].message.content)

if __name__ == "__main__":
    main()
